<?php
namespace haibao\cms\data\attendance;


class Attendance extends \haibao\cms\data\BaseMysql{
	
	public function __construct(){
		parent::__construct('\haibao\cms\model\data\attendance\AttendanceDefine');
	}
	
	public function clearAttendanceRecord($startTime,$endTime){
		$sql = 'delete from  AttendanceDefine where ClickDate>=%s and ClickDate<=%s and Status=%s';
		$this->query($sql,array($startTime,$endTime,\haibao\cms\model\data\attendance\AttendanceDefine::STATUS_ENABLE));
		$sql = 'delete from  AttendanceDefineTmp where ClickDate>=%s and ClickDate<=%s and Status=%s';
		$this->query($sql,array($startTime,$endTime,\haibao\cms\model\data\attendance\AttendanceDefine::STATUS_ENABLE));
	}
}